home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Canadian & World Encyclopedia 1998
/
The Canadian & World Encyclopedia 1998 - Disc 2.iso
/
pc
/
pb
/
profile.dir
/
00355_Script_355
< prev
next >
Wrap
Text File
|
1997-07-29
|
10KB
|
211 lines
on xwrapMedia castNameOfMedia, mediaSprite, wrapperSpritesList, bit_rect
-- repeat with qq = 1 to 2
cursor 4 -- waiting
-- set winPartsList = [#tlc: "topLeftCorner",#ts: "panelTop", #trc: "topRightCorner", #rs: "rightSide", #brc: "bottomRightCorner", #bs: "panelBottom", #blc: 17, #ls: 18, #topPanelText: 19, #topPanelMask: 20, #closeButton: "closeNormal", #media: 22]
--[#tlc: "topLeftCorner",#ts: "topSide", #trc: "topRightCorner", #rs: "rightSide", #brc: "bottomRightCorner", #bs: "bottomSide", #blc: 17, #ls: 18, #topPanelText: 19, #topPanelMask: 20, #closeButton: "closeNormal", #media: "??"]
set author = "kfraser@sfu.ca"
set copyrightHolder = "⌐1995 Gerri Sinclair & SFU ExCITE Centre"
-- Initialize
set mediaSpriteOriginH = the left of sprite mediaSprite
set mediaSpriteOriginV = the top of sprite mediaSprite
set mediaCastType = the casttype of cast the castNum of sprite mediaSprite
-- =-=-=-= 0th: Media Sprite MEDIA CAST SIZE HAS TO BE MEDIA SPRITE SIZE
-- put castNameofMedia
-- set the castNum of sprite mediaSprite to the number of cast castNameOfMedia
-- measure the media sprite & store for fast access
-- set the width of sprite mediaSprite to the width of cast castNameOfMedia
-- set the height of sprite mediaSprite to the height of cast castNameOfMedia
-- set mediaCastHeight = the height of cast castNameOfMedia
-- set mediaCastWidth = the width of cast castNameOfMedia
-- set the castNum of sprite mediaSprite to the number of cast castNameOfMedia
--POSITION: the mediasprite
-- spriteBox mediaSprite, mediaSpriteOriginH, mediaSpriteOriginV, mediaSpriteOriginH + mediaCastWidth, mediaSpriteOriginV + mediaCastHeight
-- put "before:" && the regpoint of cast castNameOfMedia -- DEBUG
-- set the regpoint of cast castNameOfMedia to [locH:mediaCastWidth/2,locV:mediaCastHeight/2]
-- put "after:" && the regpoint of cast castNameOfMedia -- DEBUG
-- set mediaLside = mediaSpriteOriginH
-- set mediaTside = mediaSpriteOriginV
-- set mediaRside = mediaSpriteOriginH + mediaCastWidth
-- set mediaBside = mediaSpriteOriginV + mediaCastHeight
--
set mediaLside = the left of bit_rect
set mediaTside = the top of bit_rect
set mediaRside = the right of bit_rect
set mediaBside = the bottom of bit_rect
set theMediaSpriteHeight = mediaBside - mediaTside
-- set up the close button
-- set theCloseButtonHeight = the height of cast "closeNormal"
set theCloseButtonHeight = the height of cast "over close up"
-- set theCloseButtonHeight = the width of cast "closeNormal"
set theCloseButtonWidth = the width of cast "over close up"
-- lapTime("Initialization") -- DEBUG
-- =-=-=-= 1st: Sprite 2: Top
if #digitalVideo = mediaCastType then
set currentSpriteNumber = getAt(wrapperSpritesList,2)
-- set maskSpriteNumber = getAt(wrapperSpritesList,10)
-- set textLabelSpriteNumber = getAt(wrapperSpritesList,9)
set pauseButtonSpriteNum = getAt(wrapperSpritesList,9)
set moreButtonSpriteNum = getAt(wrapperSpritesList,10)
end if
if #bitmap = mediaCastType then
set currentSpriteNumber = getAt(wrapperSpritesList,2)
-- set maskSpriteNumber = getAt(wrapperSpritesList,10)
-- set textLabelSpriteNumber = getAt(wrapperSpritesList,9)
set pauseButtonSpriteNum = getAt(wrapperSpritesList,9)
set moreButtonSpriteNum = getAt(wrapperSpritesList,10)
end if
set closeButtonSpriteNumber = getAt(wrapperSpritesList,11)
-- convert to property list: getProp(wrapperSpritesList, #maskSprite)
set textVoffset = 0 -- down from top of close button
-- height of top panel - height of close button / 2
set textHoffset = 2 -- in from side of close button
-- height of top panel - textVoffset
set castNameOfSpriteToMove = the name of cast the castnum of sprite currentSpriteNumber
set currentCastHeight = the height of cast castNameOfSpriteToMove
-- POSITION: top side sprite
spriteBox currentSpriteNumber, mediaLside, mediaTside-currentCastHeight, mediaRside, mediaTside
-- POSITION: mask sprite
-- spriteBox maskSpriteNumber, mediaLside, mediaTside-currentCastHeight, mediaRside, mediaTside
-- POSITION: more button sprite
set moreHoffset = 2
set moreVoffset = 2
set morebwidth = the width of sprite moreButtonSpriteNum
set morebheight = the height of sprite moreButtonSpriteNum
spriteBox moreButtonSpriteNum, mediaRside-moreHoffset-morebwidth, mediaBside-moreVoffset-morebheight, mediaRside-moreHoffset, mediaBside-moreVoffset
-- POSITION: rewind button sprite
set rewButtonSpriteNum = 43
set pauseHoffset = 2
set pauseVoffset = -38
set pausebwidth = the width of sprite rewButtonSpriteNum
set pausebheight = the height of sprite rewButtonSpriteNum
spriteBox rewButtonSpriteNum mediaLside+pauseHoffset,mediaBside + pauseVoffset, mediaLside+pauseHoffset+pausebwidth,mediaBside+pauseVoffset+pausebheight
--POSITION: pause button
set pauseHoffset = 18
set pauseVoffset = -38
set pausebwidth = the width of sprite pauseButtonSpriteNum
set pausebheight = the height of sprite pauseButtonSpriteNum
spriteBox pauseButtonSpriteNum mediaLside+pauseHoffset,mediaBside + pauseVoffset, mediaLside+pauseHoffset+pausebwidth,mediaBside+pauseVoffset+pausebheight
-- POSITION: close button sprite
set closeBtnVoffset = -15 -- down from top of close button
-- height of top panel - height of close button / 2
set closeBtnHoffset = 0 -- in from side of close button
spriteBox closeButtonSpriteNumber, mediaLside + closeBtnHoffset, mediaTside - theCloseButtonHeight-closeBtnVoffset, mediaLside + theCloseButtonWidth + closeBtnHoffset, mediaTside - closeBtnVoffset
set topPanelHeight = currentCastHeight
set totalHeight = theMediaSpriteHeight + currentCastHeight
-- lapTime("Top Panel") -- DEBUG
-- =-=-=-= 2nd: Sprite 6: Bottom Panel
set currentSpriteNumber = getAt(wrapperSpritesList,6)
set castNameOfSpriteToMove = the name of cast the castnum of sprite currentSpriteNumber
set currentCastHeight = the height of cast castNameOfSpriteToMove
spriteBox currentSpriteNumber, mediaLside, mediaBside, mediaRside, mediaBside + the height of cast castNameOfSpriteToMove
set totalHeight = totalHeight + currentCastHeight
set bottomPanelHeight = currentCastHeight
-- lapTime("Bottom Panel") -- DEBUG
-- =-=-=-= 3rd: Sprite 1: Top Left Corner
set currentSpriteNumber = getAt(wrapperSpritesList,1)
set castNameOfSpriteToMove = the name of cast the castnum of sprite currentSpriteNumber
set currentCastWidth = the width of cast castNameOfSpriteToMove
set currentCastHeight = the height of cast castNameOfSpriteToMove
set tLcHeight = currentCastHeight
set tLcWidth = currentCastWidth
spriteBox currentSpriteNumber, mediaLside-currentCastWidth, mediaTside-topPanelHeight, mediaLside, mediaTside - topPanelHeight + currentCastHeight
-- lapTime("Top Left Corner") -- DEBUG
-- =-=-=-= 4th: Sprite 3: Top Right Corner
set currentSpriteNumber = getAt(wrapperSpritesList,3)
set castNameOfSpriteToMove = the name of cast the castnum of sprite currentSpriteNumber
set currentCastWidth = the width of cast castNameOfSpriteToMove
set currentCastHeight = the height of cast castNameOfSpriteToMove
set tRcHeight = currentCastHeight
set tRcWidth = currentCastWidth
spriteBox currentSpriteNumber, mediaRside, mediaTside - topPanelHeight, mediaRside+currentCastWidth, mediaTside-topPanelHeight + currentCastHeight
-- lapTime("Top Right Corner") -- DEBUG
-- =-=-=-= 5th: Sprite 5: Bottom Right Corner
set currentSpriteNumber = getAt(wrapperSpritesList,5)
set castNameOfSpriteToMove = the name of cast the castnum of sprite getAt(wrapperSpritesList,5)
set currentCastWidth = the width of cast castNameOfSpriteToMove
set currentCastHeight = the height of cast castNameOfSpriteToMove
set bRcHeight = currentCastHeight
set bRcWidth = currentCastWidth
spriteBox currentSpriteNumber, mediaRside, mediaBside + bottomPanelHeight - currentCastHeight, mediaRside+currentCastWidth, mediaBside+bottomPanelHeight
-- lapTime("Bottom Right Corner") -- DEBUG
-- =-=-=-= 6th: Sprite 7: Bottom Left Corner
set currentSpriteNumber = getAt(wrapperSpritesList,7)
set castNameOfSpriteToMove = the name of cast the castnum of sprite getAt(wrapperSpritesList,5)
set currentCastWidth = the width of cast castNameOfSpriteToMove
set currentCastHeight = the height of cast castNameOfSpriteToMove
set bLcHeight = currentCastHeight
set bLcWidth = currentCastWidth
spriteBox currentSpriteNumber, mediaLside - currentCastWidth, mediaBside + bottomPanelHeight - currentCastHeight, mediaLside, mediaBside + bottomPanelHeight
-- lapTime("Bottom Left Corner") -- DEBUG
-- =-=-=-= 7th: Sprite 8: Left Side
set currentSpriteNumber = getAt(wrapperSpritesList,8)
set castNameOfSpriteToMove = the name of cast the castnum of sprite getAt(wrapperSpritesList,5)
set currentCastWidth = the width of cast castNameOfSpriteToMove
set currentCastHeight = the height of cast castNameOfSpriteToMove
spriteBox currentSpriteNumber, mediaLside - currentCastWidth, mediaTside - topPanelHeight + tLcHeight, mediaLside, mediaBside + bottomPanelHeight - bLcHeight
-- lapTime("Left Side") -- DEBUG
-- =-=-=-= 8th: Sprite 4: Right Side
set currentSpriteNumber = getAt(wrapperSpritesList,4)
set castNameOfSpriteToMove = the name of cast the castnum of sprite getAt(wrapperSpritesList,5)
set currentCastWidth = the width of cast castNameOfSpriteToMove
set currentCastHeight = the height of cast castNameOfSpriteToMove
spriteBox currentSpriteNumber, mediaRside, mediaTside - topPanelHeight + tRcHeight, mediaRside + currentCastWidth, mediaBside + bottomPanelHeight - bRcHeight
cursor -1 -- normal cursor
updatestage -- debug something wierd about this updatestage
end